/**
 * 专项扣款导入
 */
import { connect } from 'umi';
import { withRoutePage } from '@/utils/enhanceUtils';

import ExcelList from '@/pages/SalaryManage/SalaryCalculate/ImportExcel/ExcelList';

export default withRoutePage(
    connect(({ salarySpecialDeductModel, loading, user, importExcelModel }) => ({
        ...salarySpecialDeductModel,
        selectOrganizationCode: importExcelModel.selectOrganizationCode,
        organizationResponse: importExcelModel.organizationResponse,
        loading,
        dispatchType: {
            initType: 'salarySpecialDeductModel/init',
            changePeriodType: 'salarySpecialDeductModel/changePeriod',
            searchType: 'salarySpecialDeductModel/search',
            deleteType: 'salarySpecialDeductModel/deleteSpecialTax',
            tablePageChangeType: 'salarySpecialDeductModel/tablePageChange',
            showImportDialogType: 'salarySpecialDeductModel/showImportDialog',
            setMultiStoreType: 'salarySpecialDeductModel/setMultiStore',
            mergeSearchModelType: 'salaryPayrollTaxModel/mergeSearchModel',
            downloadTemplateType: 'salarySpecialDeductModel/downloadTemplate'
        },
        showTemplateButton: true,
        templateUrl: '/api/finance/salary/v1/template/excels/kpiTemplate.xlsx',
        uploadAction: `/api/finance/salary/v1/salaryPayrollSpecialTax/import/${importExcelModel.selectOrganizationCode}`,
        user,
        importAuthCode: 'finance:salary:computation:import:taxspecial:import'
    }))(ExcelList)
);
